{% extends "index.html" %}
{% load i18n %}

{% block content %}

{% if rosters %}
	<h1>Mes rosters</h1>
	<ul>
	{% for p in rosters %}
	    <li>{{ p.game.name }} - {{ p.serveur.name }} - {{ p.name }} <a href="/characters/roster/members/{{ p.id }}">Voir Membres</a></li>
	{% endfor %}
	</ul>
	<a href="/characters/roster/create">Creer un roster</a>
{% else %}
	{%if associatedRosters or associatedRostersWaiting %}
		{% if associatedRosters %}
			<h1>{{selectedCharacter.name}} - Rosters</h1>
			<ul>
			{% for p in associatedRosters %}
			    <li>{{ p.game.name }} - {{ p.serveur.name }} - {{ p.name }}</li>
			{% endfor %}
			</ul>
		{%endif%}
		{% if associatedRostersWaiting %}
			<h1>{{selectedCharacter.name}} - Rosters en attente de validation</h1>
			<ul>
			{% for p in associatedRostersWaiting %}
			    <li>{{ p.game.name }} - {{ p.serveur.name }} - {{ p.name }}</li>
			{% endfor %}
			</ul>
		{%endif%}
	{% else %}
		<h1>Pas de rosters</h1>
		<a href="/characters/roster/create">Creer un roster</a>
	{% endif %}
{% endif %}

{% endblock %}
